package com.sq.partner.manager.service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.sq.partner.manager.mybatis.model.GatewayChannelInfo;
import com.sq.partner.manager.mybatis.model.GatewayUser;
import com.sq.partner.manager.mybatis.model.TradCreditLmtDef;
import com.sq.partner.manager.mybatis.model.TradCreditLmtTrace;
import com.sq.partner.manager.util.Page;
/**
 * 
 * @author Kang Zhiqiang
 *
 */
public interface ICreditLmtControlService {

	/**
	 * 根据channelInfo 属性查询相应的channelInfoList
	 * @param partnerDesc
	 * @return
	 * @throws Exception
	 */
	public List<GatewayChannelInfo> queryChannelInfoListByChannelInfo(GatewayChannelInfo channelInfo) throws Exception;
	
	/**
	 * 分页查询没有“creditLmtDef”的合作伙伴及其子机构
	 * @return
	 * @throws Exception
	 */
	public Page<Map> queryNotInCreditLmtDefChannelInfo(Page<Map> page) throws Exception;
	
	/**
	 * 根据channelName分页查询TradCreditLmtDef及详细关联信息
	 * @param pageIndex
	 * @param channelName
	 * @return
	 * @throws Exception
	 */
	public Page queryCreditLmtDefByChannelName(Integer pageIndex,String channelName,GatewayUser user) throws Exception;
	
	/**
	 * 添加或修改creditLmtDef
	 * @param alertLmt
	 * @param terminalLmt
	 * @param limitNo
	 * @param channelCode
	 * @param operator
	 * @throws Exception
	 */
	public void saveOrUpdateCreditLmtDef(BigDecimal alertLmt,BigDecimal terminalLmt,String limitNo,String channelCode,String selfOnly,String operator) throws Exception;
	
	/**
	 * 根据creditLmtDef属性删除相应的creditLmtDef
	 * @param creditLmtDef
	 * @throws Exception
	 */
	public void delCreditLmtDefByCreditLmtDef(TradCreditLmtDef creditLmtDef) throws Exception;
	
	/**
	 * 追加保费(插入一条追加保费的轨迹)
	 * @param creditLmtTrace
	 * @throws Exception
	 */
	public void saveAppendMoney(TradCreditLmtTrace creditLmtTrace) throws Exception;
	
	public Page queryAppendDetailInfoByLimitNo(Integer pageIndex,TradCreditLmtTrace creditLmtTrace) throws Exception;
	
	public List<TradCreditLmtDef> queryTradCreditLmtDefsByChannelCode(String channelCode) throws Exception;
	
	public List<TradCreditLmtDef> queryTradCreditLmtDefs(TradCreditLmtDef creditLmtDef) throws Exception;
}
